package deepclone.cloneable;

/**
 * @author wangLin
 * @version 1.0
 * @projectName prototype20210416
 * @className Client01
 * @date 2021-04-20 周二
 * @time 11:18
 * @description TODO
 */


public class Client01 {

    public static void main(String[] args) {
        WeeklyLog1 log_previous, log_new;
        Attachment1 attachment1 = new Attachment1();

        //创建原型对象
        log_previous = new WeeklyLog1();
        log_previous.setAttachment1(attachment1);

        log_new = log_previous.clone();

        //比较周报是否相同
        System.out.println("周报是否相同？" + (log_previous == log_new));

//        比较附件是否相同
        System.out.println("附件是否相同？" + (log_previous.getAttachment1() == log_new.getAttachment1()));


    }
}
